/**
 * Copyright(c) 2014 Xunton Solutions
 *
 * History:
 *   15-6-11 上午10:54 Created by dwzhang
 */
package com.jade.bss.weixin.api.component.event;

import java.util.Date;
import javax.persistence.Column;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

import com.jade.bss.weixin.api.protocol.xml.adapter.SecondToDateAdapter;

/**
 * 第三方平台推送的事件
 *
 * @author <a href="mailto:dwzhang@xunton.com">dwzhang</a> 
 * @version 1.0 15-6-11 上午10:54
 */
@XmlAccessorType (XmlAccessType.FIELD)
public abstract class ComponentEvent
{
    @XmlElement (name = "AppId")
    private String appId;
    @XmlElement (name = "CreateTime")
    @XmlJavaTypeAdapter (SecondToDateAdapter.class)
    private Date createTime;
    @XmlElement (name = "InfoType")
    private String infoType;

    public String getAppId()
    {
        return appId;
    }

    public void setAppId(String appId)
    {
        this.appId = appId;
    }

    public String getInfoType()
    {
        return infoType;
    }

    public void setInfoType(String infoType)
    {
        this.infoType = infoType;
    }

    protected String getEvent()
    {
        return infoType;
    }

    public Date getCreateTime()
    {
        return createTime;
    }

    public void setCreateTime(Date createTime)
    {
        this.createTime = createTime;
    }
}
